<include file="Common:header" />
<load href="__PUBLIC__/{:C('ADMIN_THEME_PATH')}/js/modules/kindEditor/kindeditor-all-min.js" />
<div class="layui-card layadmin-header"> <span class="layui-breadcrumb" lay-filter="menu" lay-separator="/"> <a href="{:U('Index/welcome')}">首页</a><a href="{:U('Category/index')}">分类管理</a> <a href="{:U('Category/add')}">添加分类</a> </span> </div>

<div class="layui-fluid pt-10 pr-10 pl-20 pt-20">
	<form class="layui-form" name="addForm" id="addForm" method="post" action="{:U('Category/save')}">
		<input type="hidden" name="lm_id" value="{$menuData['lm_id']}" />
		<input type="hidden" name="id" value="{$data['id']}" />
		<input type="hidden" name="sort" value="{$sort}" />

		{:W('Tcms/showCategorySelect',array($data,$selected,$menuData))}
		
		{:W('Tcms/showInput',array('category_title',$data,$menuData))}
		{:W('Tcms/showInput',array('category_title1',$data,$menuData))}
		{:W('Tcms/showInput',array('category_title2',$data,$menuData))}
		{:W('Tcms/showInput',array('category_bremark',$data,$menuData))}
		
		{:W('Tcms/showTextarea',array('category_name1',$data,$menuData))}
		{:W('Tcms/showTextarea',array('category_name2',$data,$menuData))}
		
		{:W('Tcms/showEditorContent',array('category_content1',$data,$menuData))}
		{:W('Tcms/showEditorContent',array('category_content2',$data,$menuData))}
		
		{:W('Tcms/showUploadSingle',array('category_smallpic',$data,$menuData))}
		{:W('Tcms/showUploadSingle',array('category_bigpic',$data,$menuData))}
		
		{:W('Tcms/showUploadMulti',array('category_multipic',$data,$menuData))}
		
		{:W('Tcms/showCreated',array('created',$data,$menuData))}
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit lay-filter="formDemo">确认提交</button>
				<button type="reset" class="layui-btn layui-btn-primary" onClick="self.history.back();">返回</button>
			</div>
		</div>
	</form>
</div>
<script>
layui.use(['categoryAdd'], function(){
	var categoryAdd = layui.categoryAdd;
	categoryAdd.init();
});

KindEditor.ready(function(K) {
	var editorOptions = {
		width : '100%',
		height : '200px;',
		filterMode : false,
		resizeType : 1,
		newlineTag : '<br />',
		items : [
        'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste','plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright','justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript','superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen','formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold','italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage','flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak','anchor', 'link', 'unlink', '|', 'quickformat'],
		uploadJson : '/admin/upload/kindEditor',
		fileManagerJson : '/admin/upload/fileManager',
		urlType : 'absolute',
		allowFileManager : true,
	};
	var editor = K.create('textarea[class="content"]', editorOptions);
});
</script>